<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改票据管理')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-bill-edit" th:object="${sysBill}">
            <input name="billId" th:field="*{billId}" type="hidden">
            <input name="status" th:field="*{status}" type="hidden">
            <input   id="billUrl" name="billUrl" th:field="*{billUrl}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">上传票据：</label>
                <div class="col-sm-8">
                    <div id="drop_area">
                      <img src="">
                        <img th:src="*{billUrl}" class="img-responsive" style="width: 100%;height: auto;" alt="" >
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">发票编号：</label>
                <div class="col-sm-8">
                    <input id="invoiceNum" th:field="*{invoiceNum}" name="invoiceNum" class="form-control" type="text"  required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">总计金额：</label>
                <div class="col-sm-8">
                    <input id="totalAmount" th:field="*{totalAmount}" name="totalAmount" class="form-control"  type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">开票日期：</label>
                <div class="col-sm-8">
                    <input id="invoiceDate" th:field="*{invoiceDate}" name="invoiceDate" class="form-control"  type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">购买方：</label>
                <div class="col-sm-8">
                    <input id="purchaserName" th:field="*{purchaserName}" name="purchaserName" class="form-control"  type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">销售方：</label>
                <div class="col-sm-8">
                    <input id="sellerName" name="sellerName"  th:field="*{sellerName}" class="form-control"  type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">单位：</label>
                <div class="col-sm-8">
                    <input id="unit" name="unit" th:field="*{unit}" class="form-control"  type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">规格：</label>
                <div class="col-sm-8">
                    <input id="type" name="type"  th:field="*{type}" class="form-control"  type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">数量：</label>
                <div class="col-sm-8">
                    <input id="num" name="num" th:field="*{num}" class="form-control"  type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">价格：</label>
                <div class="col-sm-8">
                    <input id="price" name="price" th:field="*{price}" class="form-control"  type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">金额：</label>
                <div class="col-sm-8">
                    <input id="amount" name="amount" th:field="*{amount}" class="form-control"  type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">税率：</label>
                <div class="col-sm-8">
                    <input id="taxRate" name="taxRate" th:field="*{taxRate}" class="form-control"  type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">税额：</label>
                <div class="col-sm-8">
                    <input id="tax" name="tax" th:field="*{tax}" class="form-control"  type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark"  class="form-control">[[*{remark}]]</textarea>
                </div>
            </div>
        </form>

    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: jqueryUpload-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/bill";
        $("#form-bill-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-bill-edit').serialize());
            }
        }

    </script>
</body>
</html>